package com.biz;

import com.dao.OrdersMapper;
import com.entity.Orders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class IOrdersBizImp implements IOrdersBiz{

    @Autowired
    private OrdersMapper dao;

    public OrdersMapper getDao() {
        return dao;
    }

    public void setDao(OrdersMapper dao) {
        this.dao = dao;
    }

    @Override
    public List<Orders> getAll() {
        return dao.getAll();
    }

    @Override
    public void add_Orders(Orders o) {
        dao.add_Orders(o);
    }

    @Override
    public void del_Orders(int id) {
        dao.del_Orders(id);
    }

    @Override
    public Orders getById(int id) {
        return dao.getById(id);
    }

    @Override
    public void mod_Orders(Orders o) {
        dao.mod_Orders(o);
    }

    @Override
    public void mod_Status(Orders o) {
        dao.mod_Status(o);
    }

    @Override
    public List<Orders> getAllBystate() {
        return dao.getAllBystate();
    }

    @Override
    public List<Map> getByUid(Integer uid) {
        return dao.getByUid(uid);
    }

    @Override
    public Integer getMaxOid() {
        return dao.getMaxOid();
    }

    @Override
    public Orders getByIdAndUid(Integer oid, Integer uid) {
        return dao.getByIdAndUid(oid,uid);
    }
}
